package com.guguju.ssms.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by dell on 2022-5-15.
 */
public class LoginData implements Parcelable {


    /**
     "auth": "9F655374B55D43F5772FEE7579B40F87364B8563",
     "asessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiemhpdGlhbiIsIk5pY2tOYW1lIjoiUmljaGFyZCIsIlJvbGUiOiJBZG1pbmlzdHJhdG9yIiwiZXhwIjoxNjUyNTgxOTkzLCJpc3MiOiJzc21zIiwiYXVkIjoic3NtcyJ9.p4ZnnASZIEbhTlsOtZg65gspdlmFRJFM8bM5wF_MWT4",
     "userId": 1
     */

    /**
     * 用户授权码
     */
    private String auth;
    /**
     * 用户ID
     */
    private int userId;

    /**
     * 用于登录成功令牌
     */
    private String asessToken;


    public LoginData(){

    }

    public LoginData(int userId, String auth, String asessToken) {
        this.userId = userId;
        this.auth = auth;
        this.asessToken = asessToken;
    }

    protected LoginData(Parcel in) {
        auth = in.readString();
        userId = in.readInt();
        asessToken = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(auth);
        dest.writeInt(userId);
        dest.writeString(asessToken);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<LoginData> CREATOR = new Creator<LoginData>() {
        @Override
        public LoginData createFromParcel(Parcel in) {
            return new LoginData(in);
        }

        @Override
        public LoginData[] newArray(int size) {
            return new LoginData[size];
        }
    };



    public String getAuth() {
        return auth;
    }

    public void setAuth(String auth) {
        this.auth = auth;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getAsessToken() {
        return asessToken;
    }

    public void setAsessToken(String asessToken) {
        this.asessToken = asessToken;
    }


}
